package com.swss.g.user.service.impl;

import java.util.ArrayList;
import java.util.List;

import com.swss.g.base.impl.BaseServiceImpl;
import com.swss.g.user.bean.Popedom;
import com.swss.g.user.dao.PopedomDAO;
import com.swss.g.user.dao.UserDAO;
import com.swss.g.user.service.PopedomService;

public class PopedomServiceImpl extends BaseServiceImpl<Popedom> implements
		PopedomService {
	private PopedomDAO popedomDao;
	
	private UserDAO userDao;

	public PopedomDAO getPopedomDao() {
		return popedomDao;
	}

	public void setPopedomDao(PopedomDAO popedomDao) {
		this.setBaseDao(popedomDao);
		this.popedomDao = popedomDao;
	}

	public void delAllPopedom(int[] ids) throws Exception {
		// TODO Auto-generated method stub
		List<Popedom> list = new ArrayList<Popedom>();
		Popedom p = null;
		for (int i = 0; i < ids.length; i++) {
			p = new Popedom();
			p.setId(ids[i]);
			list.add(p);
		}

		this.popedomDao.deleteAll(list);
		
		

	}

	public UserDAO getUserDao() {
		return userDao;
	}

	public void setUserDao(UserDAO userDao) {
		
		this.userDao = userDao;
	}

}
